<!doctype html>
<html>
<head>
<?php $this->load->view('admin/common_head'); ?>
</head>
<body>
<div class="wrap">
	<div class="nav">
		<div class="return"><a href="<?php echo site_url('admin/broker/index'); ?>">返回上一级</a></div>
		<ul class="cc">
			<li class="current"><a href="<?php echo site_url('admin/broker/edit?uid='.$uid); ?>">经纪人资料</a></li>
		</ul>
	</div>
	<form id="J_broker_form" action="<?php echo site_url('admin/broker/do_edit'); ?>" method="post" accept-charset="utf-8">
		<input type="hidden" name="uid" value="<?php echo $broker['uid']; ?>" />
		<div class="h_a">基本资料</div>
		<div class="table_full">
			<table width="100%">
				<col class="th" />
				<col width="400" />
				<col />
				<tr>
					<th>UID</th>
					<td><?php echo $broker['uid']; ?></td>
					<td></td>
				</tr>
				<tr>
					<th>帐号</th>
					<td><?php echo $broker['username']; ?></td>
					<td><div class="fun_tips"></div></td>
				</tr>
				<tr>
					<th>用户组</th>
					<td>
						<select name="groupid" class="mr10">
					<?php
						foreach($groups as $group)
						{
							if($group['type'] == 'broker')
							{
					?>
							<option value="<?php echo $group['groupid']; ?>" <?php echo set_select('groupid', $group['groupid'], $group['groupid'] == $broker['groupid']); ?>><?php echo $group['name']; ?></option>
					<?php
							}
						}
					?>
						</select>
					</td>
					<td><div class="fun_tips">必须是已存在的帐号</div></td>
				</tr>
				<tr>
					<th>真实姓名</th>
					<td><input type="text" name="realname" value="<?php echo $broker['realname']; ?>" class="input length_5" /></td>
					<td></td>
				</tr>
				<!--
				<tr>
					<th>所属总公司</th>
					<td><input type="text" name="agencyparentid" value="<?php echo $broker['agencyparentid']; ?>" class="input length_5" /></td>
					<td></td>
				</tr>
				<tr>
					<th>所属分店</th>
					<td><input type="text" name="agencyid" value="<?php echo $broker['agencyid']; ?>" class="input length_5" /></td>
					<td></td>
				</tr>
				-->
				<tr>
					<th>所属公司</th>
					<td><input type="text" name="company" value="<?php echo $broker['company']; ?>" class="input length_5" /></td>
					<td></td>
				</tr>
				<tr>
					<th>工作地址</th>
					<td><input type="text" name="address" value="<?php echo $broker['address']; ?>" class="input length_5" /></td>
					<td><div class="fun_tips">例如：XX市XX区XX路XX号</div></td>
				</tr>
				<tr>
					<th>认证类型</th>
					<td>
					<?php
						$broker['verify'] = explode(',', $broker['verify']);
					?>
						<ul id="J_verify_type" class="switch_list cc">
							<li><input type="checkbox" name="verify[]" value="1" <?php echo set_checkbox('verify[]', 1, in_array(1,$broker['verify'])); ?> data-arr="J_verify_1" />身份证认证</li>
							<li><input type="checkbox" name="verify[]" value="2" <?php echo set_checkbox('verify[]', 2, in_array(2,$broker['verify'])); ?> data-arr="J_verify_2" />支付宝认证</li>
							<li><input type="checkbox" name="verify[]" value="3" <?php echo set_checkbox('verify[]', 3, in_array(3,$broker['verify'])); ?> data-arr="J_verify_3" />手机认证</li>
						</ul>
					</td>
					<td></td>
				</tr>
				<tbody id="J_verify_1">
					<tr>
						<th>身份证号码</th>
						<td><input type="text" name="idcard" value="<?php echo $broker['idcard']; ?>" class="input length_5" /></td>
						<td></td>
					</tr>
					<tr>
						<th>身份证图片</th>
						<td><div class="single_image_up"><a href="">上传图片</a><input type="file" class="J_upload_preview" name="idcardpic" data-preview="#J_idcardpic_preview"></div></td>
						<td></td>
					</tr>
				</tbody>
				<tbody id="J_verify_2">
					<tr>
						<th>支付宝帐号</th>
						<td><input type="text" name="alipay" value="<?php echo $broker['alipay']; ?>" class="input length_5" /></td>
						<td></td>
					</tr>
				</tbody>
				<tbody id="J_verify_3">
					<tr>
						<th>手机号码</th>
						<td><input type="text" name="phone" value="<?php echo $broker['phone']; ?>" class="input length_5" /></td>
						<td></td>
					</tr>
				</tbody>
				<tr>
					<th>加入时间</th>
					<td><input type="text" name="createtime" value="<?php echo date('Y-m-d H:i', $broker['createtime']); ?>" class="input J_datetime length_5" /></td>
					<td></td>
				</tr>
				<tr>
					<th>经纪人备注</th>
					<td><textarea name="remark" class="length_5"><?php echo $broker['remark']; ?></textarea></td>
					<td></td>
				</tr>
				<tr>
					<th>店铺公告</th>
					<td><textarea name="announce" class="length_5"><?php echo $broker['announce']; ?></textarea></td>
					<td></td>
				</tr>
				<tr>
					<th>经纪人状态</th>
					<td>
						<ul id="J_verify_type" class="switch_list cc">
							<li><input type="radio" name="status" value="unactive" <?php echo set_radio('status', 'unactive', $broker['status'] == 'unactive'); ?> />未激活</li>
							<li><input type="radio" name="status" value="active" <?php echo set_radio('status', 'active', $broker['status'] == 'active'); ?> />激活</li>
							<li><input type="radio" name="status" value="lock" <?php echo set_radio('status', 'lock', $broker['status'] == 'lock'); ?> />锁定</li>
						</ul>
					</td>
					<td></td>
				</tr>
			</table>
		</div>
		<div class="btn_wrap">
			<div class="btn_wrap_pd">
				<button type="submit" class="btn btn_submit">提交</button>
			</div>
		</div>
	</form>
</div>
<?php $this->load->view('admin/common_footer'); ?>
<!--
<script>
</script>
-->
</body>
</html>